package com.advice;

import org.springframework.beans.factory.DisposableBean;

public class AdviceTarget {
    /**
     * 用来测试前置增强，后置增强，环绕增强
     */
    public String testAdvice(String param1, String param2) {
        System.out.println("我是测试方法testAdvice-->param1:"+param1+"-"+"param2"+param2);
        return "测试方法返回:";

    }

    /**
     * 用来测试异常增强
     * @return
     */
    public String testException() {
        System.out.println("我是测试方法testException");
        throw new RuntimeException("测试方法抛出异常");
    }
}
